Write a Java statement that puts a zero into row 5 column 3.
gradeTable[ 5 ][ 3 ] = 0;
99 | 42 | 74 | 83 | 100 |
90 | 91 | 72 | 88 | 95 |
88 | 61 | 74 | 89 | 96 |
61 | 89 | 82 | 98 | 93 |
93 | 73 | 75 | 78 | 99 |
50 | 65 | 92 | 87 | 94 |
43 | 98 | 78 | 56 | 99 |
The row and column numbers are not part of the array. They are usually shown in pictures of an array, but the array object does not explicitly store the indexes. When you ask for
gradeTable[ 5 ][ 3 ]
Java knows what cell you mean and goes there directly.
More Important Stuff:
Details about these issues will follow.
With the example array, will the following statement work?
gradeTable[7][2] = 82 ;